python remove all except numbers

21

>>> import re
>>> re.sub('\D', '', 'aas30dsa20')
'3020'

Comments

Submit
0 Comments